package com.yanyi.security.auth.service;

import com.yanyi.security.auth.util.user.JwtAuthenticationRequest;

/**
 * @author: yukong
 * @date: 2018/7/25 18:49
 * @description:
 */
public interface AuthService {

    /**
     * 登录获取token
     * @param authenticationRequest
     * @return
     * @throws Exception
     */
    String login(JwtAuthenticationRequest authenticationRequest) throws Exception;

    /**
     * token刷新
     * @param oldToken
     * @return
     * @throws Exception
     */
    String refresh(String oldToken) throws Exception;

    /**
     * token校验
     * @param token
     * @throws Exception
     */
    void validate(String token) throws Exception;
}
